From: Jasper St. Pierre Date: Tue, 3 Dec 2013 20:56:12 +0000 (-0500) Subject: background: Don't wait for gdk-pixbuf to fail before loading animations X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3022 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=eb1c85f3f5503d3778a935295e625c27947bfe40;p=gnome-shell.git background: Don't wait for gdk-pixbuf to fail before loading animations We don't have any better way of determining whether something is a slideshow animation, so discriminate on the .xml filename instead of waiting for gdk-pixbuf to determine whether it can load a file or not. https://bugzilla.gnome.org/show_bug.cgi?id=719803 --- diff --git a/js/ui/background.js b/js/ui/background.js index 0a21bd239..5f11e5777 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -536,24 +536,25 @@ const Background = new Lang.Class({ }); }, - _loadFile: function(filename) { + _loadImage: function(filename) { this._cache.getImageContent({ monitorIndex: this._monitorIndex, effects: this._effects, style: this._style, filename: filename, cancellable: this._cancellable, onFinished: Lang.bind(this, function(content) { - if (!content) { - if (!this._cancellable.is_cancelled()) - this._loadAnimation(filename); - return; - } - - this._addImage(content, 0, filename); + if (content) + this._addImage(content, 0, filename); this._setLoaded(); }) }); + }, + _loadFile: function(filename) { + if (filename.endsWith('.xml')) + this._loadAnimation(filename); + else + this._loadImage(filename); }, _load: function () {